<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <title>我的门店</title>
    <script src="__INDEX__/store/js/mui.min.js"></script>
	<link href="__INDEX__/store/css/mui.min.css" rel="stylesheet" />
	<link rel="stylesheet" href="__INDEX__/store/css/style.css" />
	<link rel="stylesheet" href="__INDEX__/store/css/iconfont.css" />
	<link rel="stylesheet" href="__INDEX__/store/css/sjhout.css" />
    <script type="text/javascript" charset="utf-8">
      	mui.init();
    </script>
</head>
<body>
	<header class="mui-bar mui-bar-nav">
	    <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
	    <h1 class="mui-title">我的门店</h1>
	</header>
	<div class="mui-content recharge_content">
		<ul class="myshop_lsdedit">
			<li class="clearfix">
				<div class="left">LOGO：</div>
				<div class="toux">
					<div class="gerenzl_top img-click">
	   		 		<div class="actions">
							<div class="file-btn" >
				                <span><img class='img_list' id='img_list' src="{$agent_info['logo']}" style="width: 100%;height: 100%;" ></span>
				            </div>
					</div>
				</div>
					
				</div>
			</li>
			<li class="clearfix">
				<div class="left">店铺名称：</div>
				<input class="right clearfix" type="text" placeholder="" name='chain_name' id='chain_name'>
			</li>
			<li class="clearfix">
				<div class="left">地址：</div>
				<input class="right clearfix" type="text" placeholder="" name='chain_address' id='chain_address'>
			</li>
		</ul>
		<button class="chongz_btn" id='crete_chain' style="background: #D6AA50;">确定</button>		  
	</div>
</body>
<script type="text/javascript" src="__INDEX__/store/js/jquery.min.js"></script>
<script type="text/javascript" src="__INDEX__/store/js/layer/layer.min.js"></script>
<script type="text/javascript" src="__INDEX__/store/js/app.js"></script>
<script>
	$('#crete_chain').click(function(){
		var chain_name = $("#chain_name").val();
		var chain_address = $("#chain_address").val();
		var myreg = /^1[3578]\d{9}$/; 
		if(chain_name == "" || chain_address == ""){
			layer.msg('请将信息填写完整');
			return false;
		}
//		if(!myreg.test(chain_mobile)){
//				layer.msg('请输入有效的手机号码！'); 
//				return false;
//		}
		$.ajax({
				type:'post',
				url: "{:url('agent/myshop_lsdadd')}",
				data: {
					name		: chain_name,
					address		: chain_address
				},
				success: function(data) {
						layer.msg(data.msg, {
									time: 1000
							}, function(){
				    			location.href="{:url('agent/shop_list')}";
						});
				}
			});
	});
</script>
</html>
